﻿<!-- #include file="mymin.asp" -->
<%
Call Head()
w "<card title='文章移动'><p>"

dim id,classid,rs,isEssay,author,msg
id= int(request.QueryString("id"))  
classid= int(request.QueryString("classid"))
isEssay= request.QueryString("is_essay")

If id="" Or IsNumeric(id)=False Or classid="" Or IsNumeric(classid)=False Then Call Error("id错误")

set rs=server.createobject("adodb.recordset")
rs.open "select classid,hu_author,title from 74hu_article where id="&id,myconn,1,3
if rs.eof then 
	w "操作失败!没有此文章"
else
	If isEssay="1" Then
		author=rs("hu_author")
		If author<>"" And IsNumeric(author) Then
			'投稿奖励,加金币积分经验
			'TODO 有bug
			msg = calcUserAmount(author, amtEssay)
			Call sendMsgToUser(author,"恭喜!你的投稿"&rs("title")&"通过审核,获得系统奖励:"&msg)
		End If
	End If
	rs("classid")=classid
	rs.update()
	w "移动文章成功"
end if
rs.close
set rs=nothing
%>
<br/>----------<br/>
<a href="adminsmscl.asp?sid=<%=sid%>&amp;id=<%=classid%>">[文章列表]</a><br/>
<a href="wzclass.asp?sid=<%=sid%>">[文章分类]</a><%Call Last%>